home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8469 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: in1.uu.net!csnews!mox!tchrist
  2. From: Tom Christiansen <tchrist@mox.perl.com>
  3. Newsgroups: comp.lang.perl.misc,comp.lang.c
  4. Subject: Re: Need Perl to C translator
  5. Date: 4 Mar 1996 15:06:39 GMT
  6. Organization: Perl Consulting and Training
  7. Message-ID: <4hf0tv$aio@csnews.cs.colorado.edu>
  8. References: <313AD616.3EFE2530@cache.iet.unipi.it>
  9. Reply-To: tchrist@mox.perl.com (Tom Christiansen)
  10. NNTP-Posting-Host: perl.com
  11. Content-Type: text/plain; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. Originator: tchrist@mox
  14.  
  15.  [courtesy cc of this posting sent to cited author via email]
  16.  
  17. In comp.lang.perl.misc, 
  18.     Luca Ronchi <ronchi@cache.iet.unipi.it> writes:
  19. :I need a Perl to C translator, because I must include some stuff in a
  20. :C program. Is out there something, or there is another way of
  21. :executing Perl scripts without the interpreter; I mean can a perl
  22. :script be made in a executable ?
  23.  
  24. Help #1: read the fine perl FAQ, even if it is outdated.  There's
  25.      a question addressing this; #3.5 to be precise.
  26.  
  27.     http://www.perl.com/perl/faq/Q3.5.html
  28.  
  29. Help #2: think about whether you can just call your perl program 
  30.      using system() or popen().
  31.  
  32.      $ man 3 system
  33.      $ man 3 open
  34.  
  35. Help #3: think about whether you can embed your C program in the 
  36.      perl one.  For that, see the perlxstut(1) man page.  It's
  37.      probably more sensible to do more work at the higher level
  38.      language (perl), leaving little painstaking busiwork for the 
  39.      low-level one (C).
  40.  
  41.     http://www.perl.com/perl/manual/perlxstut.html
  42.  
  43. Help #4: think about whether you can embed your perl program in the 
  44.      C one the way the perlembed(1).  It's probably
  45.      more sensible to do more work at the higher level language.
  46.  
  47.     http://www.perl.com/perl/manual/perlembed.html
  48.  
  49. Help #5: There's actually a p2c compiler to convert your perl code
  50.     into C that in alpha state right now, but it's not released to 
  51.     the general world yet.
  52.  
  53. --tom "the net helps those who help themselves" christiansen
  54. -- 
  55. Tom Christiansen      Perl Consultant, Gamer, Hiker      tchrist@mox.perl.com
  56.  
  57.             /* dbmrefcnt--;  */     /* doesn't work, rats */
  58.         --Larry Wall in hash.c from the v4.0 perl source code
  59.